Optimal. Leaf size=359 \[ -\frac{\log \left (-\sqrt{2} \sqrt [4]{a} x \sqrt{\sqrt{a+b}-\sqrt{a}}+\sqrt{a+b}+\sqrt{a} x^2\right )}{4 \sqrt{2} \sqrt [4]{a} \sqrt{a+b} \sqrt{\sqrt{a+b}-\sqrt{a}}}+\frac{\log \left (\sqrt{2} \sqrt [4]{a} x \sqrt{\sqrt{a+b}-\sqrt{a}}+\sqrt{a+b}+\sqrt{a} x^2\right )}{4 \sqrt{2} \sqrt [4]{a} \sqrt{a+b} \sqrt{\sqrt{a+b}-\sqrt{a}}}-\frac{\tan ^{-1}\left (\frac{\sqrt{\sqrt{a+b}-\sqrt{a}}-\sqrt{2} \sqrt [4]{a} x}{\sqrt{\sqrt{a+b}+\sqrt{a}}}\right )}{2 \sqrt{2} \sqrt [4]{a} \sqrt{a+b} \sqrt{\sqrt{a+b}+\sqrt{a}}}+\frac{\tan ^{-1}\left (\frac{\sqrt{\sqrt{a+b}-\sqrt{a}}+\sqrt{2} \sqrt [4]{a} x}{\sqrt{\sqrt{a+b}+\sqrt{a}}}\right )}{2 \sqrt{2} \sqrt [4]{a} \sqrt{a+b} \sqrt{\sqrt{a+b}+\sqrt{a}}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.261469, antiderivative size = 359, normalized size of antiderivative = 1., number of steps used = 9, number of rules used = 5, integrand size = 16, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.312, Rules used = {1094, 634, 618, 204, 628} \[ -\frac{\log \left (-\sqrt{2} \sqrt [4]{a} x \sqrt{\sqrt{a+b}-\sqrt{a}}+\sqrt{a+b}+\sqrt{a} x^2\right )}{4 \sqrt{2} \sqrt [4]{a} \sqrt{a+b} \sqrt{\sqrt{a+b}-\sqrt{a}}}+\frac{\log \left (\sqrt{2} \sqrt [4]{a} x \sqrt{\sqrt{a+b}-\sqrt{a}}+\sqrt{a+b}+\sqrt{a} x^2\right )}{4 \sqrt{2} \sqrt [4]{a} \sqrt{a+b} \sqrt{\sqrt{a+b}-\sqrt{a}}}-\frac{\tan ^{-1}\left (\frac{\sqrt{\sqrt{a+b}-\sqrt{a}}-\sqrt{2} \sqrt [4]{a} x}{\sqrt{\sqrt{a+b}+\sqrt{a}}}\right )}{2 \sqrt{2} \sqrt [4]{a} \sqrt{a+b} \sqrt{\sqrt{a+b}+\sqrt{a}}}+\frac{\tan ^{-1}\left (\frac{\sqrt{\sqrt{a+b}-\sqrt{a}}+\sqrt{2} \sqrt [4]{a} x}{\sqrt{\sqrt{a+b}+\sqrt{a}}}\right )}{2 \sqrt{2} \sqrt [4]{a} \sqrt{a+b} \sqrt{\sqrt{a+b}+\sqrt{a}}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 1094
Rule 634
Rule 618
Rule 204
Rule 628
Rubi steps
\begin{align*} \int \frac{1}{a+b+2 a x^2+a x^4} \, dx &=\frac{\int \frac{\frac{\sqrt{2} \sqrt{-\sqrt{a}+\sqrt{a+b}}}{\sqrt [4]{a}}-x}{\frac{\sqrt{a+b}}{\sqrt{a}}-\frac{\sqrt{2} \sqrt{-\sqrt{a}+\sqrt{a+b}} x}{\sqrt [4]{a}}+x^2} \, dx}{2 \sqrt{2} \sqrt [4]{a} \sqrt{a+b} \sqrt{-\sqrt{a}+\sqrt{a+b}}}+\frac{\int \frac{\frac{\sqrt{2} \sqrt{-\sqrt{a}+\sqrt{a+b}}}{\sqrt [4]{a}}+x}{\frac{\sqrt{a+b}}{\sqrt{a}}+\frac{\sqrt{2} \sqrt{-\sqrt{a}+\sqrt{a+b}} x}{\sqrt [4]{a}}+x^2} \, dx}{2 \sqrt{2} \sqrt [4]{a} \sqrt{a+b} \sqrt{-\sqrt{a}+\sqrt{a+b}}}\\ &=\frac{\int \frac{1}{\frac{\sqrt{a+b}}{\sqrt{a}}-\frac{\sqrt{2} \sqrt{-\sqrt{a}+\sqrt{a+b}} x}{\sqrt [4]{a}}+x^2} \, dx}{4 \sqrt{a} \sqrt{a+b}}+\frac{\int \frac{1}{\frac{\sqrt{a+b}}{\sqrt{a}}+\frac{\sqrt{2} \sqrt{-\sqrt{a}+\sqrt{a+b}} x}{\sqrt [4]{a}}+x^2} \, dx}{4 \sqrt{a} \sqrt{a+b}}-\frac{\int \frac{-\frac{\sqrt{2} \sqrt{-\sqrt{a}+\sqrt{a+b}}}{\sqrt [4]{a}}+2 x}{\frac{\sqrt{a+b}}{\sqrt{a}}-\frac{\sqrt{2} \sqrt{-\sqrt{a}+\sqrt{a+b}} x}{\sqrt [4]{a}}+x^2} \, dx}{4 \sqrt{2} \sqrt [4]{a} \sqrt{a+b} \sqrt{-\sqrt{a}+\sqrt{a+b}}}+\frac{\int \frac{\frac{\sqrt{2} \sqrt{-\sqrt{a}+\sqrt{a+b}}}{\sqrt [4]{a}}+2 x}{\frac{\sqrt{a+b}}{\sqrt{a}}+\frac{\sqrt{2} \sqrt{-\sqrt{a}+\sqrt{a+b}} x}{\sqrt [4]{a}}+x^2} \, dx}{4 \sqrt{2} \sqrt [4]{a} \sqrt{a+b} \sqrt{-\sqrt{a}+\sqrt{a+b}}}\\ &=-\frac{\log \left (\sqrt{a+b}-\sqrt{2} \sqrt [4]{a} \sqrt{-\sqrt{a}+\sqrt{a+b}} x+\sqrt{a} x^2\right )}{4 \sqrt{2} \sqrt [4]{a} \sqrt{a+b} \sqrt{-\sqrt{a}+\sqrt{a+b}}}+\frac{\log \left (\sqrt{a+b}+\sqrt{2} \sqrt [4]{a} \sqrt{-\sqrt{a}+\sqrt{a+b}} x+\sqrt{a} x^2\right )}{4 \sqrt{2} \sqrt [4]{a} \sqrt{a+b} \sqrt{-\sqrt{a}+\sqrt{a+b}}}-\frac{\operatorname{Subst}\left (\int \frac{1}{-2 \left (1+\frac{\sqrt{a+b}}{\sqrt{a}}\right )-x^2} \, dx,x,-\frac{\sqrt{2} \sqrt{-\sqrt{a}+\sqrt{a+b}}}{\sqrt [4]{a}}+2 x\right )}{2 \sqrt{a} \sqrt{a+b}}-\frac{\operatorname{Subst}\left (\int \frac{1}{-2 \left (1+\frac{\sqrt{a+b}}{\sqrt{a}}\right )-x^2} \, dx,x,\frac{\sqrt{2} \sqrt{-\sqrt{a}+\sqrt{a+b}}}{\sqrt [4]{a}}+2 x\right )}{2 \sqrt{a} \sqrt{a+b}}\\ &=-\frac{\tan ^{-1}\left (\frac{\sqrt{-\sqrt{a}+\sqrt{a+b}}-\sqrt{2} \sqrt [4]{a} x}{\sqrt{\sqrt{a}+\sqrt{a+b}}}\right )}{2 \sqrt{2} \sqrt [4]{a} \sqrt{a+b} \sqrt{\sqrt{a}+\sqrt{a+b}}}+\frac{\tan ^{-1}\left (\frac{\sqrt{-\sqrt{a}+\sqrt{a+b}}+\sqrt{2} \sqrt [4]{a} x}{\sqrt{\sqrt{a}+\sqrt{a+b}}}\right )}{2 \sqrt{2} \sqrt [4]{a} \sqrt{a+b} \sqrt{\sqrt{a}+\sqrt{a+b}}}-\frac{\log \left (\sqrt{a+b}-\sqrt{2} \sqrt [4]{a} \sqrt{-\sqrt{a}+\sqrt{a+b}} x+\sqrt{a} x^2\right )}{4 \sqrt{2} \sqrt [4]{a} \sqrt{a+b} \sqrt{-\sqrt{a}+\sqrt{a+b}}}+\frac{\log \left (\sqrt{a+b}+\sqrt{2} \sqrt [4]{a} \sqrt{-\sqrt{a}+\sqrt{a+b}} x+\sqrt{a} x^2\right )}{4 \sqrt{2} \sqrt [4]{a} \sqrt{a+b} \sqrt{-\sqrt{a}+\sqrt{a+b}}}\\ \end{align*}
Mathematica [C] time = 0.0709081, size = 119, normalized size = 0.33 \[ \frac{i \tan ^{-1}\left (\frac{\sqrt{a} x}{\sqrt{a+i \sqrt{a} \sqrt{b}}}\right )}{2 \sqrt{b} \sqrt{a+i \sqrt{a} \sqrt{b}}}-\frac{i \tan ^{-1}\left (\frac{\sqrt{a} x}{\sqrt{a-i \sqrt{a} \sqrt{b}}}\right )}{2 \sqrt{b} \sqrt{a-i \sqrt{a} \sqrt{b}}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.167, size = 913, normalized size = 2.5 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{1}{a x^{4} + 2 \, a x^{2} + a + b}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 1.52051, size = 1195, normalized size = 3.33 \begin{align*} \frac{1}{4} \, \sqrt{\frac{{\left (a b + b^{2}\right )} \sqrt{-\frac{1}{a^{3} b + 2 \, a^{2} b^{2} + a b^{3}}} + 1}{a b + b^{2}}} \log \left ({\left ({\left (a^{2} b + a b^{2}\right )} \sqrt{-\frac{1}{a^{3} b + 2 \, a^{2} b^{2} + a b^{3}}} + b\right )} \sqrt{\frac{{\left (a b + b^{2}\right )} \sqrt{-\frac{1}{a^{3} b + 2 \, a^{2} b^{2} + a b^{3}}} + 1}{a b + b^{2}}} + x\right ) - \frac{1}{4} \, \sqrt{\frac{{\left (a b + b^{2}\right )} \sqrt{-\frac{1}{a^{3} b + 2 \, a^{2} b^{2} + a b^{3}}} + 1}{a b + b^{2}}} \log \left (-{\left ({\left (a^{2} b + a b^{2}\right )} \sqrt{-\frac{1}{a^{3} b + 2 \, a^{2} b^{2} + a b^{3}}} + b\right )} \sqrt{\frac{{\left (a b + b^{2}\right )} \sqrt{-\frac{1}{a^{3} b + 2 \, a^{2} b^{2} + a b^{3}}} + 1}{a b + b^{2}}} + x\right ) - \frac{1}{4} \, \sqrt{-\frac{{\left (a b + b^{2}\right )} \sqrt{-\frac{1}{a^{3} b + 2 \, a^{2} b^{2} + a b^{3}}} - 1}{a b + b^{2}}} \log \left ({\left ({\left (a^{2} b + a b^{2}\right )} \sqrt{-\frac{1}{a^{3} b + 2 \, a^{2} b^{2} + a b^{3}}} - b\right )} \sqrt{-\frac{{\left (a b + b^{2}\right )} \sqrt{-\frac{1}{a^{3} b + 2 \, a^{2} b^{2} + a b^{3}}} - 1}{a b + b^{2}}} + x\right ) + \frac{1}{4} \, \sqrt{-\frac{{\left (a b + b^{2}\right )} \sqrt{-\frac{1}{a^{3} b + 2 \, a^{2} b^{2} + a b^{3}}} - 1}{a b + b^{2}}} \log \left (-{\left ({\left (a^{2} b + a b^{2}\right )} \sqrt{-\frac{1}{a^{3} b + 2 \, a^{2} b^{2} + a b^{3}}} - b\right )} \sqrt{-\frac{{\left (a b + b^{2}\right )} \sqrt{-\frac{1}{a^{3} b + 2 \, a^{2} b^{2} + a b^{3}}} - 1}{a b + b^{2}}} + x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.616945, size = 63, normalized size = 0.18 \begin{align*} \operatorname{RootSum}{\left (t^{4} \left (256 a^{2} b^{2} + 256 a b^{3}\right ) - 32 t^{2} a b + 1, \left ( t \mapsto t \log{\left (64 t^{3} a^{2} b + 64 t^{3} a b^{2} - 4 t a + 4 t b + x \right )} \right )\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: NotImplementedError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]